-- GENERATED SPELL FOR [Garaxxas] --


function spell0_24555(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(44271,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 3000, 1)
end

function spell1_24555(pUnit, Event) --@Concussive Shot,n/a--
pUnit:FullCastSpellOnTarget(27634,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 3314, 1)
end

function spell2_24555(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_24555', 559, 1)
end

function spell3_24555(pUnit, Event) --@Freezing Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(44136,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_24555', 1, 1)
end

function spell4_24555(pUnit, Event) --@Medallion of Immunity,Self--
pUnit:FullCastSpellOnTarget(46227,pUnit)
pUnit:RegisterEvent('Sorts_24555', 336, 1)
end

function spell5_24555(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(31942,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 566, 1)
end

function spell6_24555(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(44285,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 549, 1)
end

function spell7_24555(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 560, 1)
end

function spell8_24555(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 674, 1)
end

function spell9_24555(pUnit, Event) --@Wing Clip,n/a--
pUnit:FullCastSpellOnTarget(44286,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24555', 10296, 1)
end

function Sorts_24555(pUnit, Event)
local choix_sorts_24555 = math.random(0, 9)
if choix_sorts_24555 == 0 then
pUnit:RegisterEvent('spell0_24555', 1, 1)
end
if choix_sorts_24555 == 1 then
pUnit:RegisterEvent('spell1_24555', 1, 1)
end
if choix_sorts_24555 == 2 then
pUnit:RegisterEvent('spell2_24555', 1, 1)
end
if choix_sorts_24555 == 3 then
pUnit:RegisterEvent('spell3_24555', 1, 1)
end
if choix_sorts_24555 == 4 then
pUnit:RegisterEvent('spell4_24555', 1, 1)
end
if choix_sorts_24555 == 5 then
pUnit:RegisterEvent('spell5_24555', 1, 1)
end
if choix_sorts_24555 == 6 then
pUnit:RegisterEvent('spell6_24555', 1, 1)
end
if choix_sorts_24555 == 7 then
pUnit:RegisterEvent('spell7_24555', 1, 1)
end
if choix_sorts_24555 == 8 then
pUnit:RegisterEvent('spell8_24555', 1, 1)
end
if choix_sorts_24555 == 9 then
pUnit:RegisterEvent('spell9_24555', 1, 1)
end
end

function mob24555_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24555', math.random(1500, 3000), 1)
end

function mob24555_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24555_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24555_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24555, 1, 'mob24555_Action')
RegisterUnitEvent(24555, 2, 'mob24555_Leave')
RegisterUnitEvent(24555, 3, 'mob24555_Kill')
RegisterUnitEvent(24555, 4, 'mob24555_Die')
